home *** CD-ROM | disk | FTP | other *** search
- RunBack: Run a program in the background.
- *** Now searches your command search path. ***
- A revision of Rob Peck's "RunBack" program and
- Carolyn Scheppner's "Which" program.
-
- Author: Daniel Barrett
- Department of Computer Science
- The Johns Hopkins University
- Baltimore, MD 21218
-
- barrett@cs.jhu.edu
- ins_adjb@jhunix.UUCP
-
- Note: Both the original RunBackground and Which are in
- the Public Domain. So is all my code that I added.
- Use it however you please.
-
- INTRODUCTION
- ------------
- This is my altered version of Rob Peck's fine program, RunBack.
- RunBack, similar to Run, allows you to startup a CLI program and let
- it run in the background. Unlike Run, however, RunBack then allows
- the original CLI to be closed. Run would hang the CLI if you did this.
- See the file README.peck for Rob Peck's original documentation.
-
- Also unlike Run, the old RunBack did not search your command search
- path; you always had to specify the complete pathname of your command.
- My new version eliminates this hassle -- it searches your path.
-
- The path-searching code is largely taken from Carolyn Scheppner's
- "Which" program. Thanks, Carolyn!!
-
- A PROBLEM I HAD TO OVERCOME
- ---------------------------
-
- The original RunBack program I obtained was a binary version,
- compiled with the Lattice C compiler. I use the Manx (Aztec) compiler,
- version 3.6a. When I compiled Rob's original program with Manx, something
- did not work anymore... quoted arguments on the command line. The Manx
- version completely drops the quotes!
-
- The way RunBack works is that it translates:
-
- RunBack myProgram arg1 arg2
-
- into:
-
- Run >NIL: <NIL: myProgram >NIL: <NIL: arg1 arg2
-
- So a Lattice RunBack would translate from:
-
- RunBack c:emacs "my file"
-
- into:
-
- Run >NIL: <NIL: c:emacs >NIL: <NIL: "my file"
-
- HOWEVER, Manx-compiled RunBack translates it into:
-
- Run >NIL: <NIL: c:emacs >NIL: <NIL: my file
-
- which is clearly WRONG.
-
- What did I do about it? I added a few lines of #ifdef AZTEC_C
- code to the runback.c program, plus the file aztec.c. I am effectively
- replacing quotes around quoted arguments. My algorithm is this: if
- an argument has a blank space in it, then it must have been quoted, so
- put quotes around it.
- If you don't like this algorithm, the source code is included
- and you can change it any way you like.
- Since I don't have the Lattice compiler, I cannot be sure that
- my changes will work under Lattice. That is why I made all my changes
- #ifdef AZTEC_C, a constant that is automatically defined by Manx C
- after version 3.4a.
-
- Enjoy the program!
-